﻿namespace WeWork.Model
{
    /// <summary>
    /// 小程序消息
    /// </summary>
    public class ChatWeapp : MsgChatRoomBase
    {
        /*
        {
            "msgid":"11930598857592605935_1603875608",
            "action":"send",
            "from":"kens",
            "tolist":["wmGAgeDQAAsgQetTQGqRbMxrkodpM3fA"],
            "roomid":"",
            "msgtime":1603875608691,
            "msgtype":"weapp",
            "weapp":{
                "title":"开始聊天前请仔细阅读服务须知事项",
                "description":"客户需同意存档聊天记录",
                "username":"xxx@app",
                "displayname":"服务须知"
            }
        }
        */
        /// <summary>
        /// 消息内容
        /// </summary>
        public WeappInfo weapp { set; get; }
    }

    public class WeappInfo
    {
        /// <summary>
        /// 消息标题。String类型
        /// </summary>
        public string title { set; get; }
        /// <summary>
        /// 消息描述。String类型
        /// </summary>
        public string description { set; get; }
        /// <summary>
        /// 用户名称。String类型
        /// </summary>
        public string username { set; get; }
        /// <summary>
        /// 小程序名称。String类型
        /// </summary>
        public string displayname { set; get; }
    }
}
